namespace OasisCiq.Xal
{
    using System;
    using System.Linq;
    
    /// <summary>
    /// A list of name types for premises
    /// </summary>
    public class PremisesElementTypeList : XS.XSNormalizedString
    {
        private static readonly string[] PossibleValues = new[]
        {
            "Name", // Names of Premises such as airport, hospital, university, military base, etc. Can also be the name of the building or house or apartment
            "Location", // Where in the building/landmark the premises is located, e.g. lobby, ground floor, penthouse, or where in a larger complex (e.g. airport) the address is located.
            "SubPremisesConnector", // Free text description that is required to logically connect the 2 premises
            "InternalThoroughfare", // Roads and streets within boundaries of larger complexes/premises such as hospitals, airports, etc.
            "ReferenceLocation", // Free text description of some other location and how this premises relates to it, e.g. 300m from water station, new the police station, etc.
            "Type" // additional supporting information
        };

        public PremisesElementTypeList(string value)
            : base(value)
        {
            if (!PossibleValues.Contains(value))
            {
                throw new ArgumentOutOfRangeException();
            }
        }
    }
}